<template>
	<view class="container">
		<comp-pageMenu :routes="routes"></comp-pageMenu>
	</view>
</template>

<script setup>
	import usePermissionStore from '@/store/modules/permission'
	const props = defineProps({
		routes: {
			type: String,
			default: ""
		}
	})
	//通过props或者onLoad接受界面参数
	// onLoad((option) => {
	// 	console.log(option)
	// })
	const routes = ref([])
	if (props.routes) {
		routes.value = JSON.parse(props.routes)
	} else
		routes.value = usePermissionStore().sidebarRouters;
</script>

<style lang="scss">
	/* #ifndef APP-NVUE */
	page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #fff;
		min-height: 100%;
		height: auto;
	}

	view {
		font-size: 14px;
		line-height: inherit;
	}

	/* #endif */
</style>